In the prior art, there are various patterns of door or window locks with different efficacies. Conventional insertion-core lock bodies and ball-shaped lock bodies are structurally simpler and on the lower side in cost and price, but they have the following drawbacks: when they are mounted, the door body structure must be destroyed: a groove must be opened in one of the longitudinal sides of the door body to receive the lock body itself and allow for extension and retraction of the latch; the mounting procedure is troublesome and time-consuming and the strength of the door body is also destroyed. The current side-hung door or window locks do not require destroy of the door body structure and the mounting procedure is comparatively simpler, but such locks are structurally complicated, include too many transmission parts and are disadvantageous in inconvenient operations and high costs. Therefore, the scope of use of such locks is limited to a great extent.